<style>
.grid .gridTbody td div{
    height:auto;
}
</style>
<div class="pageContent">
    <if condition="isset($group)">
        <form method="post" id="form" action="__URL__/update" class="pageForm required-validate" onsubmit="return validateCallback(this, navTabAjaxDone);">
    <else />
        <form method="post" id="form" action="__URL__/insert" class="pageForm required-validate" onsubmit="return validateCallback(this, navTabAjaxDone);">
    </if>
    <div class="pageFormContent" layoutH="56">
        <div style="width:100%;float:left;margin-top:10px;">
            <label style="font-size:12px;margin-left:10px;">岗位名称:</label>
            <input name="group_name" type="text" size="30" value="{$group.group_name}" class="required"/>
        </div>
        <div style="width:100%;float:left;margin-top:10px;">
            <label style="font-size:12px;margin-left:10px;">描述：</label>
            <input name="explain" type="text" size="50" value="{$group.explain}" class=""/>
        </div>

        
        <div style="width:100%;float:left;margin-top:10px;">
            <label style="font-size:12px;margin-left:10px;">排序比重：</label>
            <input name="sortNum" type="text" size="30" value="{$group.sortNum}" class=""/>
            <span class="info">&nbsp;&nbsp;数值越小，排名越前。</span>
        </div>
        
        <div style="width:100%;float:left;margin-top:10px;">
            <label style="font-size:12px;margin-left:10px;">选择操作权限：</label>
        </div>
        <table class="table" width="100%" layoutH="118">
            <thead>
                <tr>
                    <th align="left">
                        权限
                    </th>
                    <th align="left">
                        子权限
                    </th>
                </tr>
            </thead>
            <tbody>
                <volist name="authInfo" id="value">
                <tr>
                    <td align="left"><label> 
                        <input type="checkbox" value="{$value.auth_id}" <?php echo $value['canDo'] ? "checked='true'" : "";?> title="全选" />
                        {$value.title}</label>
                    </td>
                    <td align="left">
                        <volist name="value.chird" id="val">
                            <label>
                                <input type="checkbox" class="actionGroup" name="action[]" value="{$val.auth_id}"
                                <?php echo $val['canDo'] ? "checked='true'" : "";?> />
                                {$val.title}
                            </label>
                        </volist>  
                    </td>
                </tr>
                </volist>
            </tbody>
        </table>
        <input type="hidden" name="group_id" value="{$group.group_id}" />
    </div>
    <div class="formBar">        
        <ul>
            <if condition="in_array('update', $privilegelist)">
            <li>
                <div class="buttonActive">
                    <div class="buttonContent">
                        <button type="submit">保存</button>
                    </div>
                </div>
            </li>
            <li>
                <div class="button">
                    <div class="buttonContent">
                        <button type="button" class="close">取消</button>
                    </div>
                </div>
            </li>
            </if>
        </ul>
    </div>
</form>
</div>